<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
	<meta charset="UTF-8">
	<title>Insert title here</title>
	</head>
	<body>
		<%
			String name = (String) request.getParameter("userName");
			String password = (String) request.getParameter("passWord");
			if(name.equals("admin") && password.equals("666")){
				//登录成功
				request.setAttribute("userName",name);
				request.getRequestDispatcher("welcom.jsp").forward(request, response);
			}else {
				//登录失败
				response.sendRedirect("login.jsp");
			}
		%>
	</body>
</html>